﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MySql.Data.MySqlClient;

namespace Hengbei.DAL
{
    public class TestConnClass
    {
        public void TestConn()
        {
            using (MySqlConnection conn = new MySqlConnection("server=zjianzhong.gotoftp5.com;database=zjianzhong;uid=zjianzhong;pwd=jianzhong0108;"))
            {
                conn.Open();
                using (MySqlCommand cmd = new MySqlCommand("select * from ahb_siteuser", conn))
                {
                    using (MySqlDataReader reader = cmd.ExecuteReader())
                    {
                        while (reader.Read() == true)
                        {
                            System.Diagnostics.Debug.WriteLine(reader["name"].ToString());
                        }
                    }
                }
            }
        }
    }
}
